package com.yushu;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
 * @author test
 * @CreateDate 2020-12-03 15:47:25
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@MapperScan(basePackages = {"com.yushu.**.mapper.**"})
@ComponentScan(basePackages = { "com.yushu.**" })
@EnableTransactionManagement
@EnableCaching
public class CodergunApplication extends SpringBootServletInitializer {

public static void main(String[] args) {
	SpringApplication.run(CodergunApplication.class, args);
}

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
	return builder.sources(CodergunApplication.class);
}
}
